home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / amarok / install-mp3
Encoding:
Text File  |  2007-04-12  |  1.6 KB  |  39 lines

  1. check_mp3() {
  2.    if [ $? -eq 0 ]; then
  3.      if [ -x /usr/bin/kdialog ]; then
  4.        kdialog --msgbox "MP3 support now installed, you will need to restart Amarok."
  5.      elif [ -x /usr/bin/zenity ]; then
  6.        zenity --info --text "MP3 support now installed, you will need to restart Amarok."
  7.      else
  8.        Xdialog --msgbox "MP3 support now installed, you will need to restart Amarok." 5 60
  9.      fi
  10.      exit 0
  11.    else
  12.      if [ -x /usr/bin/kdialog ]; then
  13.        kdialog --msgbox "There was an error installing MP3 support. You need to install the package \"libxine1-ffmpeg\" manually."
  14.      elif [ -x /usr/bin/zenity ]; then
  15.        zenity --info --text "There was an error installing MP3 support. You need to install the package \"libxine1-ffmpeg\" manually."
  16.      else
  17.        Xdialog --msgbox "There was an error installing MP3 support.\nYou need to install the package \"libxine1-ffmpeg\" manually." 10 60
  18.      fi
  19.      exit 1
  20.    fi
  21. }
  22.  
  23. INSTALLED=`dpkg --get-selections libxine1-ffmpeg | grep install`
  24. RELEASE=`lsb_release -sc`
  25.  
  26. #is available, not installed
  27. if [ -z "$INSTALLED" ]; then
  28.   if [ -x /usr/bin/kdesu ] && [ -x /usr/bin/adept_batch ]; then
  29.     kdesu -d "bash -c \"kdialog --msgbox 'Fetching package list, please wait...' & apt-get update && killall kdialog; adept_batch install libxine1-ffmpeg\""
  30.   elif [ -x /usr/bin/gksudo ] && [ -x /usr/sbin/synaptic ]; then
  31.     gksudo "bash -c 'apt-get update && echo libxine1-ffmpeg i | synaptic --set-selections --non-interactive'"
  32.   else
  33.     xterm -e 'sudo apt-get update && sudo apt-get install libxine1-ffmpeg'
  34.   fi
  35.   check_mp3
  36. fi
  37.  
  38. exit 0
  39.